package com.sanjiahantang.youjiarole.module.project.models.impl;

import android.content.Context;

import com.sanjiahantang.uilibrary.utils.Utils;
import com.sanjiahantang.youjiarole.base.CallBack;
import com.sanjiahantang.youjiarole.config.ConfigValue;
import com.sanjiahantang.youjiarole.config.StaticValue;
import com.sanjiahantang.youjiarole.http.BaseDelegate;
import com.sanjiahantang.youjiarole.http.OkHttpClientManager;
import com.sanjiahantang.youjiarole.module.me.scheme.beans.MeSchemeListBean;
import com.sanjiahantang.youjiarole.module.project.beans.ProjectInnerListResponseBean;
import com.sanjiahantang.youjiarole.module.project.beans.ProjectListResponseBean;
import com.sanjiahantang.youjiarole.module.project.models.IProjectModel;
import com.squareup.okhttp.Request;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by zy on 2017/10/29.
 */

public class ProjectModel implements IProjectModel,StaticValue{
    @Override
    public void loadProjectList(final Context context, Map<String, Object> param, final CallBack<MeSchemeListBean> callBack) {
        OkHttpClientManager.postJson(context, ConfigValue.API_URL + "/user/phone/require/searchRequireForRole", param,
                new BaseDelegate.ResultCallback<MeSchemeListBean>() {
                    @Override
                    public void onError(Request request, Object tag, Exception e) {
                        callBack.onFailure(e.getMessage());
                    }

                    @Override
                    public void onResponse(MeSchemeListBean response, Object tag) {
                        callBack.onSuccess(response,context,tag);
                    }
                },true);
    }

    @Override
    public void loadProjectInnerList(Context context, Map<String, Object> param, CallBack<ProjectInnerListResponseBean> callBack) {
        callBack.onSuccess(null,context,10);
    }
}
